package com.csh.auth.common.enums;

import lombok.Getter;

/**
 * 删除状态枚举
 */
@Getter
public enum IsDeletedFlagEnum {
    //枚举类的对象名称，定义多少个就有多少个对象
    DELETED(1,"已删除"),
    UN_DELETED(0,"未删除");

    private int code;
    private String msg;

    IsDeletedFlagEnum(int code , String msg){
        this.code = code;
        this.msg = msg;
    }


    public static IsDeletedFlagEnum getByCode(int codeValue){
        for(IsDeletedFlagEnum resultCodeEnum : IsDeletedFlagEnum.values()){
            if (resultCodeEnum.code == codeValue){
                return resultCodeEnum;
            }
        }
        return null;
    }
}
